import request from '@/utils/request'

export function userDict(query) {
  return request({
    url: '/gather/gather/collectProductTask/userDict',
    method: 'get',
    params: query
  })
}

export function updateCollectId(query) {
  return request({
    url: '/gather/gather/collectProductTask/updateCollectId',
    method: 'get',
    params: query
  })
}

// 查询采集商品任务列表
export function listCollectProductTask(query) {
  return request({
    url: '/gather/gather/collectProductTask/list',
    method: 'get',
    params: query
  })
}

// 查询采集商品任务详细
export function getCollectProductTask(id) {
  return request({
    url: '/gather/gather/collectProductTask/' + id,
    method: 'get'
  })
}

// 新增采集商品任务
export function addCollectProductTask(data) {
  return request({
    timeout: 6000000,
    url: '/gather/gather/collectProductTask',
    method: 'post',
    data: data
  })
}

// 修改采集商品任务
export function updateCollectProductTask(data) {
  return request({
    url: '/gather/gather/collectProductTask',
    method: 'put',
    data: data
  })
}

// 删除采集商品任务
export function delCollectProductTask(id) {
  return request({
    url: '/gather/gather/collectProductTask/' + id,
    method: 'delete'
  })
}
